using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using Eamon.MeituanDotnetSDK.api.common.request;
using Eamon.MeituanDotnetSDK.attribute;

namespace Eamon.MeituanDotnetSDK.model.ddzh.merchantdata.merchantDataPoitraffic
{
    /// <summary>
    /// 获取门店流量数据
    /// </summary>
    [ApiMeta(
        Path = "/ddzh/merchantdata/poitraffic",
        BusinessId = 58,
        ApiVersion = "10002",
        ApiName = "merchant_data_poitraffic",
        NeedAuth = true
    )]
    public class MerchantDataPoitrafficRequest : MeituanRequest<MerchantDataPoitrafficResponse>
    {
        /// <summary>
        /// 用来区分平台信息，分为MT：美团；DP：大众点评；ALL：美团+大众点评
        /// </summary>
        [Required(ErrorMessage = "platform不能为空")]
        [JsonPropertyName("platform")]
        public string Platform { get; set; }

        /// <summary>
        /// 查询数据的起始时间。格式为yyyy-MM-dd
        /// </summary>
        [Required(ErrorMessage = "startDate不能为空")]
        [JsonPropertyName("startDate")]
        public string StartDate { get; set; }

        /// <summary>
        /// 查询数据的结束时间，格式为yyyy-MM-dd。要求：查询时间长度不得超过30天，endDate &gt;= startDate，且endDate最晚为两天前，如今日为13号，则endDate最晚为11号。
        /// </summary>
        [Required(ErrorMessage = "endDate不能为空")]
        [JsonPropertyName("endDate")]
        public string EndDate { get; set; }

        public override string ToString()
        {
            return $"MerchantDataPoitrafficRequest{{Platform={Platform}, StartDate={StartDate}, EndDate={EndDate}}}";
        }
    }
}
